import request from "@/utils/request";

// 获取商品分类
export function getgoodsList(params) {
  return request({
    url: "goods",
    method: "get",
    params,
  });
}

// 1.8.3. 根据 ID 查询商品
export function QueryGoodsByID(id) {
  return request({
    url: `goods/${id}`,
    method: "get",
  });
}

// 删除商品列表的数据
export function delgoods(id) {
  return request({
    url: `goods/${id}`,
    method: "delete",
  });
}

export function addgoodsL(data) {
  return request({
    url: "goods",
    method: "post",
    data,
  });
}
